package ${packageService};

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
import java.util.Map;
import java.util.ArrayList;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import ${packageApi}.${api};
import ${packageMapper}.${mapper};
import ${packageModel}.${model};

/**
 * service业务处理层
 * @author code_generator
 */
@Service
@Transactional(readOnly=true)
public class ${service} implements ${api}{
	private static final Logger logger = LoggerFactory.getLogger(${service}.class);

	@Autowired
	private ${mapper} ${mapperVal};

	public ${model} getOne(Map<String,Object> params){
		return ${mapperVal}.getOne(params);
	}

	public List<${model}> getList(Map<String,Object> params){
		return ${mapperVal}.getList(params);
	}
	
	@Transactional
	public void delete(List<String> ids) {
		if(ids!=null && !ids.isEmpty()) {
			for(String id : ids) {
				${mapperVal}.deleteByPrimaryKey(id.trim());
			}
		}
	}

	@Transactional
	public void save(${model} ${modelVal}){
		//int count = ${mapperVal}.insert(${modelVal});
	}

	
	
	
	
	
	
	
	
	
	
	
	
	
	
}